<?php
	include("../../app/View/Parts/left.ctp");
?>
	<div class="span9">
		<div class="btn btn-info pull-right add"><?php  echo $this->Html->link('Add Menu', array('action' => 'add')); ?></div>
	</div>
	<div class="br">&nbsp;</div>
	<div class="span9">
	<table width="100%" class="table-bordered table-striped" cellpadding="5">
		<thead>
			<tr bgcolor="#ccc">
				<th>Sl</th>
				<th>Associated Page</th>
				<th>Menu</th>
				<th>Menu Type</th>
				<th>Action</th>
			</tr>
		</thead>
		<tbody>
		<?php
			$sl=0;
			foreach($menus as $menu){
				$sl ++ ;
				if($sl%2==0){
					echo '
						<tr bgcolor="#E2E2E2">
							<td>'.$sl.'</td>
							<td>'.$menu['page_title'].'</td>
							<td>'.$menu['menu'].'</td>
							<td>'.$menu['menu_type'].'</td>
							<td>'.$this->Html->link('Edit', array('action' => 'edit', $menu['id'])).' | '.$this->Form->postLink('Delete', array('action' => 'delete',$menu['id']),array('confirm' => 'Are you sure?')).'</td>
						</tr>
					';
				}else{
					echo '
						<tr>
							<td>'.$sl.'</td>
							<td>'.$menu['page_title'].'</td>
							<td>'.$menu['menu'].'</td>
							<td>'.$menu['menu_type'].'</td>
							<td>'.$this->Html->link('Edit', array('action' => 'edit', $menu['id'])).' | '.$this->Form->postLink('Delete', array('action' => 'delete',$menu['id']),array('confirm' => 'Are you sure?')).'</td>
						</tr>
					';
				}
			}
		?>
		</tbody>
	</table>
	<br>
</div>
<div style="clear:both;"></div>